package com.gitee.ixtf.vertx.internal.converter

import com.gitee.ixtf.vertx.ParameterConverter
import com.gitee.ixtf.vertx.internal.rc
import graphql.schema.DataFetchingEnvironment
import io.vertx.core.http.HttpServerRequest
import io.vertx.ext.web.RoutingContext

object HttpServerRequestParameterConverter : ParameterConverter<HttpServerRequest> {
  override suspend fun convert(env: DataFetchingEnvironment): HttpServerRequest = env.rc().request()

  override suspend fun convert(rc: RoutingContext): HttpServerRequest = rc.request()
}
